---
-- @param t
-- @return
local function shuffle(t)
    if not t then return end
    math.randomseed(os.time())
    assert(t, "table.shuffle() expected a table, got nil")
    local iterations = #t
    local j
    for i = iterations, 2, -1 do
        j = math.random(i)
        t[i], t[j] = t[j], t[i]
    end
end
table.shuffle = shuffle;

---
-- @param t
-- @return
local function copy(t)
    if not t then return end
    
    local t2 = {}
    for k,v in pairs(t) do
        t2[k] = v
    end
    return t2
end
table.copy = copy;

local function toString(t)
    if not t then return end
    for k,v in pairs(t) do
        print(k, v)
    end
    
end
table.toString = toString

